package com.only4play.common.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.Instant;

/**
 * 响应结果抽象父类
 *
 * @author liyuncong
 * @date 2023/11/06 14:18
 **/
@Getter
@Setter
@NoArgsConstructor
public abstract class AbstractResponse {
    protected Integer code;
    protected String message;
    protected Long timestamp = Instant.now().getEpochSecond();

    public AbstractResponse(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
